package com.wonders.bigdata.dubborpc.provider;

import com.wonders.bigdata.dubborpc.publicinterface.HelloService;
import org.apache.commons.lang3.StringUtils;

/**
 * Description: <br>
 *
 * @author: XB
 * @date: 2022/2/8 15:18
 */
public class HelloServiceImpl implements HelloService {
    private static int count = 0;
    @Override
    public String hello(String msg) {
        System.out.println("收到客户端消息= " + msg);
        // 根据msg不同返回不同结果
        if (StringUtils.isNotEmpty(msg)) {
            return "你好客户端，我已经收到你的消息【" + msg + "】 第" + (++count) + "次";
        }else {
            return "你好客户端，你传的消息为空！";
        }
    }
}
